package com.ljq.ioc.model;

import com.ljq.ioc.annotation.Autowired;
import com.ljq.ioc.annotation.Component;
import com.ljq.ioc.annotation.Qualifier;

@Component
public class A {

    @Autowired
    public B b;

    @Qualifier(ImplementationClass = "DImpl2")
    @Autowired
    private D d;

    public void BMethod(){
        b.print();
    }

    public void CMethod(){
        b.Cmethod();
    }

    public void DMethod(){
        d.print();
    }
}
